Create a callback function in the parent component: This function will be used to update the state of the parent component. In this example, when the button in ChildComponent is clicked, the sendData method is called, which in turn calls the handleData method of ParentComponent (passed down as a prop), updating the state of ParentComponent with the data from ChildComponent